<?php
class FormCoinCard extends CFormModel
{
	public $pin;
	public $seri;
	public $verifyCode;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			// name, email, subject and body are required
			array('pin, seri', 'required'),
			array('pin,seri', 'numerical'),
			// verifyCode needs to be entered correctly
			array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
		);
	}

	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'verifyCode'=>Yii::t('label','Nhập mã xác minh'),
			'pin'=>Yii::t('label','Nhập mã PIN'),
			'seri'=>Yii::t('label','Nhập số SERI'),
		);
	}
}